<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/pages/templates/templateMain.xhtml">

	<ui:param name="browser_tab_title" value="Summary" />
	<ui:param name="page_title" value="Service summary" />

	<ui:define name="content">


		<h:form id="summaryForm">

			<p:panel toggleable="true">
				<f:facet name="header">
					<h:outputText value="Summary" />
				</f:facet>
				<h:panelGrid columns="2" columnClasses="column" cellpadding="5">
					<h:outputText value="Name: " />
					<h:outputText value="#{service.name}" style="font-weight:bold" />

					<h:outputText value="Description: " />
					<h:outputText value="#{service.description}"
						style="font-weight:bold" />
				</h:panelGrid>
				<br />

			</p:panel>
			<br />
			<p:panel toggleable="true">

				<f:facet name="header">
					<h:outputText value="Bundles" />
				</f:facet>

				<p:dataTable id="bundleDataTable" value="#{selectedBundles}"
					var="_bundle" emptyMessage="No item to display" paginator="true"
					paginatorPosition="top" rows="20">

					<p:column filterBy="#{_bundle.bundleData.symbolicName}">
						<f:facet name="header">
							<h:outputText value="Symbolic name" />
						</f:facet>
						<h:outputText value="#{_bundle.bundleData.symbolicName}" />
					</p:column>

					<p:column>
						<f:facet name="header">
							<h:outputText value="Presentation name" />
						</f:facet>
						<h:outputText value="#{_bundle.bundleData.presentationName}" />
					</p:column>

					<p:column filterBy="#{_bundle.bundleData.version}"
						filterStyle="width: 50px" styleClass="centered">
						<f:facet name="header">
							<h:outputText value="Version" />
						</f:facet>
						<h:outputText value="#{_bundle.bundleData.version}" />
					</p:column>
				</p:dataTable>

			</p:panel>
			<br/>
			<p:panel toggleable="true">
				<f:facet name="header">
					<h:outputText value="Resources" />
				</f:facet>
				<h:panelGroup id="resourcesPanel">
					<ui:include src="/pages/resource/resourceDataTable.xhtml">
						<ui:param name="resourceList" value="#{service.resources}" />
					</ui:include>
				</h:panelGroup>
			</p:panel>

			<br />
			<p:commandButton value="Cancel" action="cancel" immediate="true"
				ajax="false" />
			<p:commandButton value="Done" action="#{editServiceBean.saveService}"
				ajax="false" />
		</h:form>
	</ui:define>
</ui:composition>